/*
 * $Id: LogRecordFormatter.java 161 2013-01-28 11:38:01Z vladimirow@mail.ru $
 * $HeadURL: http://ultralog.googlecode.com/svn/ultralog/tags/release-0.1/src/java/com/google/code/ultralog/writer/LogRecordFormatter.java $
 *
 * This file is a part of ultralog project (http://code.google.com/p/ultralog/).
 * Released under New BSD License.
 */
package com.google.code.ultralog.writer;

import com.google.code.ultralog.utils.CharacterOutputStream;
import com.google.code.ultralog.utils.CharacterSequence;

/**
 * Formats log records to be written to log.
 *
 * @author Mikhail Vladimirov
 */
public interface LogRecordFormatter {
    /**
     * Format log record and write it to given character output stream.
     *
     * @param loggerName name of the logger log record was logged by
     * @param level logging level the record was logged at
     * @param levelName human-readable name of the logging level
     * @param message log record message
     * @param destination character output stream to write formatted log record
     *        to
     */
    public void formatLogRecord (
        String loggerName,
        int level, String levelName,
        CharacterSequence message, CharacterOutputStream destination);
}
